package com.ecoolex.chinadutyfree.retailer.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.lang.NonNull;

public class DirectMailGoodsMarketingExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer offset;

    protected Integer rows;

    public DirectMailGoodsMarketingExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DirectMailGoodsMarketingExample orderBy(String orderByClause) {
        this.setOrderByClause(orderByClause);
        return this;
    }

    public DirectMailGoodsMarketingExample orderBy(String ... orderByClauses) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < orderByClauses.length; i++) {
            sb.append(orderByClauses[i]);
            if (i < orderByClauses.length - 1) {
                sb.append(" , ");
            }
        }
        this.setOrderByClause(sb.toString());
        return this;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria(this);
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
        rows = null;
        offset = null;
    }

    public static Criteria newAndCreateCriteria() {
        DirectMailGoodsMarketingExample example = new DirectMailGoodsMarketingExample();
        return example.createCriteria();
    }

    public DirectMailGoodsMarketingExample when(boolean condition, IExampleWhen then) {
        if (condition) {
            then.example(this);
        }
        return this;
    }

    public DirectMailGoodsMarketingExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {
        if (condition) {
            then.example(this);
        } else {
            otherwise.example(this);
        }
        return this;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return this.offset;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public Integer getRows() {
        return this.rows;
    }

    public DirectMailGoodsMarketingExample limit(Integer rows) {
        this.rows = rows;
        return this;
    }

    public DirectMailGoodsMarketingExample limit(Integer offset, Integer rows) {
        this.offset = offset;
        this.rows = rows;
        return this;
    }

    public DirectMailGoodsMarketingExample page(Integer page, Integer pageSize) {
        this.offset = page * pageSize;
        this.rows = pageSize;
        return this;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("directmailgoodsmarketing.Id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("directmailgoodsmarketing.Id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("directmailgoodsmarketing.Id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("directmailgoodsmarketing.Id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Id <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.Id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.Id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.Id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.Id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andPositionIsNull() {
            addCriterion("directmailgoodsmarketing.`Position` is null");
            return (Criteria) this;
        }

        public Criteria andPositionIsNotNull() {
            addCriterion("directmailgoodsmarketing.`Position` is not null");
            return (Criteria) this;
        }

        public Criteria andPositionEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`Position` =", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionNotEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`Position` <>", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionGreaterThan(String value) {
            addCriterion("directmailgoodsmarketing.`Position` >", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`Position` >=", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionLessThan(String value) {
            addCriterion("directmailgoodsmarketing.`Position` <", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`Position` <=", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`Position` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionLike(String value) {
            addCriterion("directmailgoodsmarketing.`Position` like", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionNotLike(String value) {
            addCriterion("directmailgoodsmarketing.`Position` not like", value, "position");
            return (Criteria) this;
        }

        public Criteria andPositionIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.`Position` in", values, "position");
            return (Criteria) this;
        }

        public Criteria andPositionNotIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.`Position` not in", values, "position");
            return (Criteria) this;
        }

        public Criteria andPositionBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.`Position` between", value1, value2, "position");
            return (Criteria) this;
        }

        public Criteria andPositionNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.`Position` not between", value1, value2, "position");
            return (Criteria) this;
        }

        public Criteria andPositionValueIsNull() {
            addCriterion("directmailgoodsmarketing.PositionValue is null");
            return (Criteria) this;
        }

        public Criteria andPositionValueIsNotNull() {
            addCriterion("directmailgoodsmarketing.PositionValue is not null");
            return (Criteria) this;
        }

        public Criteria andPositionValueEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue =", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueNotEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue <>", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueGreaterThan(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue >", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue >=", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueLessThan(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue <", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue <=", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.PositionValue <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andPositionValueLike(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue like", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueNotLike(String value) {
            addCriterion("directmailgoodsmarketing.PositionValue not like", value, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.PositionValue in", values, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueNotIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.PositionValue not in", values, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.PositionValue between", value1, value2, "positionValue");
            return (Criteria) this;
        }

        public Criteria andPositionValueNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.PositionValue not between", value1, value2, "positionValue");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdIsNull() {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId is null");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdIsNotNull() {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId is not null");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId =", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdNotEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId <>", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdGreaterThan(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId >", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId >=", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdLessThan(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId <", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId <=", value, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.DirectMailGoodsId <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId in", values, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdNotIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId not in", values, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId between", value1, value2, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andDirectMailGoodsIdNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.DirectMailGoodsId not between", value1, value2, "directMailGoodsId");
            return (Criteria) this;
        }

        public Criteria andWeightIsNull() {
            addCriterion("directmailgoodsmarketing.Weight is null");
            return (Criteria) this;
        }

        public Criteria andWeightIsNotNull() {
            addCriterion("directmailgoodsmarketing.Weight is not null");
            return (Criteria) this;
        }

        public Criteria andWeightEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight =", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightNotEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight <>", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightGreaterThan(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight >", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightGreaterThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight >=", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightLessThan(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight <", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightLessThanOrEqualTo(Integer value) {
            addCriterion("directmailgoodsmarketing.Weight <=", value, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Weight <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andWeightIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.Weight in", values, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightNotIn(List<Integer> values) {
            addCriterion("directmailgoodsmarketing.Weight not in", values, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.Weight between", value1, value2, "weight");
            return (Criteria) this;
        }

        public Criteria andWeightNotBetween(Integer value1, Integer value2) {
            addCriterion("directmailgoodsmarketing.Weight not between", value1, value2, "weight");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNull() {
            addCriterion("directmailgoodsmarketing.Deleted is null");
            return (Criteria) this;
        }

        public Criteria andDeletedIsNotNull() {
            addCriterion("directmailgoodsmarketing.Deleted is not null");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualTo(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted =", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualTo(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted <>", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThan(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted >", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted >=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThan(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted <", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualTo(Boolean value) {
            addCriterion("directmailgoodsmarketing.Deleted <=", value, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.Deleted <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andDeletedIn(List<Boolean> values) {
            addCriterion("directmailgoodsmarketing.Deleted in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotIn(List<Boolean> values) {
            addCriterion("directmailgoodsmarketing.Deleted not in", values, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedBetween(Boolean value1, Boolean value2) {
            addCriterion("directmailgoodsmarketing.Deleted between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("directmailgoodsmarketing.Deleted not between", value1, value2, "deleted");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNull() {
            addCriterion("directmailgoodsmarketing.`CreateUser` is null");
            return (Criteria) this;
        }

        public Criteria andCreateUserIsNotNull() {
            addCriterion("directmailgoodsmarketing.`CreateUser` is not null");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` =", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` <>", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThan(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` >", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` >=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThan(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` <", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` <=", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.`CreateUser` <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateUserLike(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotLike(String value) {
            addCriterion("directmailgoodsmarketing.`CreateUser` not like", value, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.`CreateUser` in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.`CreateUser` not in", values, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.`CreateUser` between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateUserNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.`CreateUser` not between", value1, value2, "createUser");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("directmailgoodsmarketing.CreateTime is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("directmailgoodsmarketing.CreateTime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.CreateTime <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.CreateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterion("directmailgoodsmarketing.CreateTime in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsmarketing.CreateTime not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsmarketing.CreateTime between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsmarketing.CreateTime not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNull() {
            addCriterion("directmailgoodsmarketing.UpdateUser is null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIsNotNull() {
            addCriterion("directmailgoodsmarketing.UpdateUser is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser =", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser <>", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThan(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser >", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser >=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThan(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser <", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualTo(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser <=", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateUser <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateUserLike(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotLike(String value) {
            addCriterion("directmailgoodsmarketing.UpdateUser not like", value, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.UpdateUser in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotIn(List<String> values) {
            addCriterion("directmailgoodsmarketing.UpdateUser not in", values, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.UpdateUser between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateUserNotBetween(String value1, String value2) {
            addCriterion("directmailgoodsmarketing.UpdateUser not between", value1, value2, "updateUser");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("directmailgoodsmarketing.UpdateTime is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("directmailgoodsmarketing.UpdateTime is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime = ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime <> ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime > ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime >= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime < ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("directmailgoodsmarketing.UpdateTime <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualToColumn(DirectMailGoodsMarketing.Column column) {
            addCriterion(new StringBuilder("directmailgoodsmarketing.UpdateTime <= ").append(column.getEscapedColumnName()).toString());
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterion("directmailgoodsmarketing.UpdateTime in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterion("directmailgoodsmarketing.UpdateTime not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsmarketing.UpdateTime between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("directmailgoodsmarketing.UpdateTime not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        private DirectMailGoodsMarketingExample example;

        protected Criteria(DirectMailGoodsMarketingExample example) {
            super();
            this.example = example;
        }

        public DirectMailGoodsMarketingExample example() {
            return this.example;
        }

        @Deprecated
        public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
            if (ifAdd) {
                add.add(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then) {
            if (condition) {
                then.criteria(this);
            }
            return this;
        }

        public Criteria when(boolean condition, ICriteriaWhen then, ICriteriaWhen otherwise) {
            if (condition) {
                then.criteria(this);
            } else {
                otherwise.criteria(this);
            }
            return this;
        }

        public Criteria andLogicalDeleted(boolean deleted) {
            return deleted ? andDeletedEqualTo(DirectMailGoodsMarketing.Deleted.IS_DELETED.value()) : andDeletedNotEqualTo(DirectMailGoodsMarketing.Deleted.IS_DELETED.value());
        }

        @Deprecated
        public interface ICriteriaAdd {
            Criteria add(Criteria add);
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }

    public interface ICriteriaWhen {
        void criteria(Criteria criteria);
    }

    public interface IExampleWhen {
        void example(com.ecoolex.chinadutyfree.retailer.entity.DirectMailGoodsMarketingExample example);
    }
}